package com.pactera.madp.cp.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pactera.madp.admin.api.vo.SysFileVo;
import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.api.dto.prod.ProdDto;
import com.pactera.madp.cp.api.dto.prod.UpdateIntroDTO;
import com.pactera.madp.cp.api.entity.prod.ProdDepositEntity;
import com.pactera.madp.cp.api.entity.prod.ProdEntity;
import com.pactera.madp.cp.api.vo.prod.BusinessCardVO;
import com.pactera.madp.cp.api.vo.prod.ProdDepositVo;
import com.pactera.madp.cp.api.vo.prod.ProdGroupVo;

import java.util.List;

/**
 * 华融湘江产品管理服务
 *
 * @author HuHao
 * @date 2022/3/16 9:31
 */
public interface ProdService extends IService<ProdEntity> {

    // 编辑存款信息
    List<ProdGroupVo> getProdGroupTree();

    // 获取存款列表
    List<ProdDepositEntity> getDeposits(Integer type);

    // 查询存款汇总列表
    List<ProdDepositVo> deposits();

    // 编辑存款信息
    R updateDeposit(ProdDepositEntity entity);

    // 获取产品列表
    List<ProdEntity> getProdList(Integer type);

    Boolean saveProd(ProdEntity prodEntity, List<Integer> deptIds);

    Boolean updateProd(ProdEntity prodEntity, List<Integer> deptIds);

    Boolean removeProd(Integer prodId);

    ProdDto getProd(Integer prodId);

    /**
     * 同步产品数据
     * @param synType 0-基金 1-理财
     * @return
     */
    Boolean syn(Integer synType);

    IPage<ProdEntity> product(Integer status, List<Integer> deptIds, Page page);

    IPage<ProdEntity> other(Integer status, Integer type, List<Integer> deptIds, Page page);

    IPage<ProdEntity> other1(String searchStr, Integer riskLevel, String prdAttr, Integer status, Integer type, Page page);

    List<ProdEntity> otherFinance(Integer status);

    BusinessCardVO getCustomerManagerDetails(String wxUserId);

    Boolean editIntroduction(UpdateIntroDTO dto);

    R<SysFileVo> managerAvatarUpload(String wxUserId, String mediaId);

    Boolean approval(ProdEntity entity, Integer id, String opinion, Integer state);

}
